package utils;

public class 数字转换 {
    public static String NumberToChinese(String numberStr)
    {
        String numStr = "0123456789";
        String chineseStr = "零一二三四五六七八九";
        char[] c = numberStr.toCharArray();
        for (int i = 0; i < c.length; i++)
        {
            int index = numStr.indexOf(c[i]);
            if (index != -1)
                c[i] = chineseStr.toCharArray()[index];
        }
        numStr = null;
        chineseStr = null;
        return new String(c);
    }

    public static void main(String[] args) {
        System.out.println(NumberToChinese("三年级"));
    }
}
